]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
MessageTray: fix unexpanded height when receiving multiple telepathy messages
authorGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 8 Sep 2012 16:54:50 +0000 (18:54 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Mon, 10 Sep 2012 08:41:37 +0000 (10:41 +0200)
ClutterBinLayout is so amazingly broken: it uses the y_expand property to
find out if the children needs to honor alignment/fill, but that property is
"bubbled up" from the grand-children, so the notificationWidget would notice
the y_expand on the notificationBin (necessary to make the layout manager on
notificationWidget honor the alignment property for the bin), and would
receive the full height of the MessageTray actor from the parent's layout manager,
resulting in a notificationWidget shifting up, with the notification detached
from the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=683628

js/ui/messageTray.js

index 614842e513774bd70bce5da7835c7e7f52ee5486..481161a170b665892c207a60f0f7f221741463a0 100644 (file)
@@ -1379,7 +1379,9 @@ const MessageTray = new Lang.Class({
         this.actor.connect('notify::hover', Lang.bind(this, this._onTrayHoverChanged));
 
         this._notificationWidget = new St.Widget({ name: 'notification-container',
+                                                   y_align: Clutter.ActorAlign.START,
                                                    x_align: Clutter.ActorAlign.CENTER,
+                                                   y_expand: true,
                                                    x_expand: true,
                                                    layout_manager: new Clutter.BinLayout() });
         this.actor.add_actor(this._notificationWidget);